package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
public class Kaipiao {
    private int kpId;//开票id
    private Dingdan dingdan;//订单
    private Huikuan huikuan;//回款
    private User emp;//员工
    private Kehu kH;//客户
    private BigDecimal kpMoney;//开票金额
    private String kpNeirong;//开票内容
    private String kpHqoma;//开票号码
    private Timestamp kpTime;//开票时间
    private Integer kpQici;//开票期次
    private String kpBeizhu;//开票备注
    private String kpFukuangfangshi;//付款方式

    @Column(name = "kp_fukuanfangshi")
    public String getKpFukuangfangshi() {
        return kpFukuangfangshi;
    }

    public void setKpFukuangfangshi(String kpFukuangfangshi) {
        this.kpFukuangfangshi = kpFukuangfangshi;
    }

    @Id
    @Column(name = "kp_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getKpId() {
        return kpId;
    }

    public void setKpId(int kpId) {
        this.kpId = kpId;
    }

    @ManyToOne
    @JoinColumn(name = "dd_id", referencedColumnName = "dd_id")
    public Dingdan getDingdan() {
        return dingdan;
    }

    public void setDingdan(Dingdan dingdan) {
        this.dingdan = dingdan;
    }

    @ManyToOne
    @JoinColumn(name = "hk_id", referencedColumnName = "hk_id")
    public Huikuan getHuikuan() {
        return huikuan;
    }

    public void setHuikuan(Huikuan huikuan) {
        this.huikuan = huikuan;
    }

    @ManyToOne
    @JoinColumn(name = "emp_id", referencedColumnName = "emp_id")
    public User getEmp() {
        return emp;
    }

    public void setEmp(User emp) {
        this.emp = emp;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }

    @Basic
    @Column(name = "kp_money", nullable = true, precision = 2)
    public BigDecimal getKpMoney() {
        return kpMoney;
    }

    public void setKpMoney(BigDecimal kpMoney) {
        this.kpMoney = kpMoney;
    }

    @Basic
    @Column(name = "kp_neirong", nullable = true, length = 200)
    public String getKpNeirong() {
        return kpNeirong;
    }

    public void setKpNeirong(String kpNeirong) {
        this.kpNeirong = kpNeirong;
    }

    @Basic
    @Column(name = "kp_hqoma", nullable = true, length = 200)
    public String getKpHqoma() {
        return kpHqoma;
    }

    public void setKpHqoma(String kpHqoma) {
        this.kpHqoma = kpHqoma;
    }

    @Basic
    @Column(name = "kp_time", nullable = true)
    public Timestamp getKpTime() {
        return kpTime;
    }

    public void setKpTime(Timestamp kpTime) {
        this.kpTime = kpTime;
    }

    @Basic
    @Column(name = "kp_qici", nullable = true)
    public Integer getKpQici() {
        return kpQici;
    }

    public void setKpQici(Integer kpQici) {
        this.kpQici = kpQici;
    }

    @Basic
    @Column(name = "kp_beizhu", nullable = true, length = 200)
    public String getKpBeizhu() {
        return kpBeizhu;
    }

    public void setKpBeizhu(String kpBeizhu) {
        this.kpBeizhu = kpBeizhu;
    }

}
